home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xaw / listp.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  4KB  |  115 lines

  1. /*
  2.  * $XConsortium: ListP.h,v 1.12 89/12/11 15:09:04 kit Exp $
  3.  *
  4.  * Copyright 1989 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  * Author:  Chris D. Peterson, MIT X Consortium
  24.  */
  25.  
  26.  
  27. /* 
  28.  * ListP.h - Private definitions for List widget
  29.  * 
  30.  * This is the List widget, it is useful to display a list, without the
  31.  * overhead of having a widget for each item in the list.  It allows 
  32.  * the user to select an item in a list and notifies the application through
  33.  * a callback function.
  34.  *
  35.  *    Created:     8/13/88
  36.  *    By:        Chris D. Peterson
  37.  *                      MIT - Project Athena
  38.  */
  39.  
  40. #ifndef _XawListP_h
  41. #define _XawListP_h
  42.  
  43. /***********************************************************************
  44.  *
  45.  * List Widget Private Data
  46.  *
  47.  ***********************************************************************/
  48.  
  49. #include <X11/Xaw/SimpleP.h>
  50. #include <X11/Xaw/List.h>
  51.  
  52. #define NO_HIGHLIGHT            XAW_LIST_NONE
  53. #define OUT_OF_RANGE            -1
  54. #define OKAY                     0
  55.  
  56. /* New fields for the List widget class record */
  57.  
  58. typedef struct {int foo;} ListClassPart;
  59.  
  60. /* Full class record declaration */
  61. typedef struct _ListClassRec {
  62.     CoreClassPart    core_class;
  63.     SimpleClassPart    simple_class;
  64.     ListClassPart    list_class;
  65. } ListClassRec;
  66.  
  67. extern ListClassRec listClassRec;
  68.  
  69. /* New fields for the List widget record */
  70. typedef struct {
  71.     /* resources */
  72.     Pixel    foreground;
  73.     Dimension    internal_width,
  74.             internal_height,
  75.                 column_space,
  76.                 row_space;
  77.     int         default_cols;
  78.     Boolean     force_cols,
  79.                 paste,
  80.                 vertical_cols;
  81.     int         longest;
  82.     int         nitems;        /* number of items in the list. */
  83.     XFontStruct    *font;
  84.     String *    list;
  85.     XtCallbackList  callback;
  86.  
  87.     /* private state */
  88.  
  89.     int         is_highlighted,    /* set to the item currently highlighted. */
  90.                 highlight,    /*set to the item that should be highlighted.*/
  91.                 col_width,    /* width of each column. */
  92.                 row_height,    /* height of each row. */
  93.                 nrows,        /* number of rows in the list. */
  94.                 ncols;        /* number of columns in the list. */
  95.     GC        normgc,        /* a couple o' GC's. */
  96.                 revgc,
  97.                 graygc;        /* used when inactive. */
  98.  
  99. } ListPart;
  100.  
  101.  
  102. /****************************************************************
  103.  *
  104.  * Full instance record declaration
  105.  *
  106.  ****************************************************************/
  107.  
  108. typedef struct _ListRec {
  109.     CorePart    core;
  110.     SimplePart    simple;
  111.     ListPart    list;
  112. } ListRec;
  113.  
  114. #endif /* _XawListP_h */
  115.